package org.sbbs.base.webapp.action;

import java.util.List;

public abstract class BaseGridAction
    extends BaseAction {
    public abstract  String gridPageList();

    public List getPageList() {
        return pageList;
    }

    public void setPageList( List pageList ) {
        this.pageList = pageList;
    }

    public Integer getTotal() {
        return total;
    }

    public void setTotal( Integer total ) {
        this.total = total;
    }

    public Integer getPage() {
        return page;
    }

    public Integer getRecords() {
        return records;
    }

    public void setPage( Integer page ) {
        this.page = page;
    }

    public void setRecords( Integer records ) {
        this.records = records;
    }

    protected Integer page = 0;

    protected Integer records = 0;

    protected Integer total = 0;

    protected List pageList;

    protected int getTotlePage( int recs, int pn ) {
        return ( ( (double) recs / (double) pn ) > ( recs / pn ) ? recs / pn + 1 : recs / pn );

    }

}
